#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
void handler(int sig)
{
    printf("signal:%d\n",sig);
}
int main()
{
    signal(2,handler);
    while(1)
    {
        printf("process:pid:%d\n",getpid());
        sleep(1);
        raise(2);
    
    }
    return 0;
}
